import pygame
from pygame.sprite import AbstractGroup

from data import color, config


class Tiled(pygame.sprite.Sprite):
    def __init__(self, tiledType, *groups: AbstractGroup):
        super().__init__(*groups)
        self.tiledType = tiledType
        if self.tiledType == 0:
            _color = color["red"]
        elif self.tiledType == 1:
            _color = color["blue"]
        elif self.tiledType == 1:
            _color = color["black"]
        else:
            _color = color['yellow']
        self.image = pygame.surface.Surface(config['tiledSize'])
        self.image.fill(_color)
        self.rect = self.image.get_rect()
